<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<link href="/static/css/bootstrap.min.css" rel="stylesheet">
	<script src="/static/js/jquery-1.11.1.min.js"></script>
	<script src="/static/js/bootstrap.min.js"></script>
	<script src="/static/js/app.js"></script>
	<link rel="stylesheet" href="/static/X-admin/css/font.css">
	<link rel="stylesheet" href="/static/X-admin/css/xadmin.css">
	<script src="/static/X-admin//lib/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript" src="/static/X-admin/js/xadmin.js"></script>
	<style>
		html,body{
			margin: 0;padding: 0;border:0;
		}
	</style>
</head>
<body>
	<!--	-&#45;&#45;&#45;&#45;导航条开始&#45;&#45;&#45;&#45;-->
	<nav class="navbar navbar-default">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="{:url('Login/index')}">图书管理系统</a>
			</div>

			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav">
					<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">会员管理<span class="caret"></span></a>
						<ul class="dropdown-menu">
							<li><a href="{:url('Login/vip_zhuce')}">会员注册</a></li>
							<li><a href="{:url('Login/vip_biao')}">会员列表</a></li>
							<li role="separator" class="divider"></li>
							<li><a href="{:url('Login/vip_chong')}">会员充值</a></li>
						</ul>
					</li>

					<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">书籍管理<span class="caret"></span></a>
						<ul class="dropdown-menu">
							<li><a href="{:url('Login/shangjia')}">新书上架</a></li>
							<li><a href="{:url('Login/books')}">书籍列表</a></li>
							<li><a href="{:url('Login/fenlei')}">添加分类</a></li>
						</ul>
					</li>

					<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">关于我们<span class="caret"></span></a>
						<ul class="dropdown-menu">
							<li><a href="{:url('Login/about')}">关于我们</a></li>
						</ul>
					</li>

					<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">员工信息<span class="caret"></span></a>
						<ul class="dropdown-menu">
							<li><a href="{:url('Login/work')}">员工列表</a></li>
						</ul>
					</li>

					<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">历史记录<span class="caret"></span></a>
						<ul class="dropdown-menu">
							<li><a href="#">借还记录</a></li>
						</ul>
					</li>

					<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">账号管理<span class="caret"></span></a>
						<ul class="dropdown-menu">
							<li><a href="{:url('Login/update')}">修改密码</a></li>
							<li><a href="#">注销账号</a></li>
							<li role="separator" class="divider"></li>
							<li><a href="{:url('Login/out')}">退出登录</a></li>
						</ul>
					</li>
				</ul>
				<ul class="nav navbar-nav navbar-right">
					<li class="dropdown">
						<a href="#" class="dropdown-toggle"  role="button" aria-haspopup="true" aria-expanded="false">昵称：{$name}</a>
					</li>
				</ul>
			</div>
		</div>
	</nav>
	<!--	-&#45;&#45;&#45;&#45;导航条结束&#45;&#45;&#45;&#45;-->

	<div style="width: 90%;margin: auto;margin-top: 50px;">
		<div class="panel panel-primary">
			<div class="panel-heading">
				<span class="glyphicon glyphicon-send"></span>
				<span>所有书籍</span>
			</div>
			<div class="panel-body">

				<table  class="table table-bordered  table-striped  table-hover">
					<tr class="primary">
						<td style="width: 50px">封面</td>
						<td>书名</td>
						<td>作者</td>
						<td>出版社</td>
						<td>租金</td>
						<td>上架日期</td>
						<td>类型</td>
						<td>操作</td>
					</tr>
					{foreach  $ops as $v}
					<tr class="primary">
						<td><img src="/{$v.book_url}" alt="" style="width: 50px;height: 40px"></td>
						<td>{$v.book_name}</td>
						<td>{$v.book_writer}</td>
						<td>{$v.book_chuban}</td>
						<td>{$v.book_money}</td>
						<td>{$v.book_time}</td>
						<td>{$v.book_type}</td>
						<td>
							<button type="button" class="btn btn-primary"><a href="{:url('Login/book_bianji')}?id={$v.id}" style="color: white">编辑</a></button>
						</td>
					</tr>
					{/foreach}
				</table>
			</div>

			<div class="page">
				<div>
					<?php if($page>1) {?>
					<a class="prev" href="?page={$page-1}">&lt;&lt;</a>
					<?php } ?>

					<?php for($i=$pageStart;$i<=$pageEnd;$i++) {?>
					<?php if($i==$page) {?>
					<span class="current">{$i}</span>
					<?php }else{ ?>
					<a class="num" href="?page={$i}">{$i}</a>
					<?php } ?>
					<?php } ?>

					<?php if($page<$pageCount) {?>
					<a class="next" href="?page={$page+1}">&gt;&gt;</a>
					<?php } ?>
				</div>
			</div>

		</div>
	</div>

	<script>

	</script>

</body>
</html>